package com.ruoyi.slope.human.crack.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.human.crack.mapper.SlopeHumanMonitoredCrackMapper;
import com.ruoyi.slope.human.crack.domain.SlopeHumanMonitoredCrack;
import com.ruoyi.slope.human.crack.service.ISlopeHumanMonitoredCrackService;

/**
 * 边坡地裂缝Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-27
 */
@Service
public class SlopeHumanMonitoredCrackServiceImpl implements ISlopeHumanMonitoredCrackService 
{
    @Autowired
    private SlopeHumanMonitoredCrackMapper slopeHumanMonitoredCrackMapper;

    /**
     * 查询边坡地裂缝
     * 
     * @param id 边坡地裂缝主键
     * @return 边坡地裂缝
     */
    @Override
    public SlopeHumanMonitoredCrack selectSlopeHumanMonitoredCrackById(Long id)
    {
        return slopeHumanMonitoredCrackMapper.selectSlopeHumanMonitoredCrackById(id);
    }

    /**
     * 查询边坡地裂缝列表
     * 
     * @param slopeHumanMonitoredCrack 边坡地裂缝
     * @return 边坡地裂缝
     */
    @DataScope(deptAlias = "s")
    @Override
    public List<SlopeHumanMonitoredCrack> selectSlopeHumanMonitoredCrackList(SlopeHumanMonitoredCrack slopeHumanMonitoredCrack)
    {
        return slopeHumanMonitoredCrackMapper.selectSlopeHumanMonitoredCrackList(slopeHumanMonitoredCrack);
    }

    /**
     * 新增边坡地裂缝
     * 
     * @param slopeHumanMonitoredCrack 边坡地裂缝
     * @return 结果
     */
    @Override
    public int insertSlopeHumanMonitoredCrack(SlopeHumanMonitoredCrack slopeHumanMonitoredCrack)
    {
        slopeHumanMonitoredCrack.setCreateTime(DateUtils.getNowDate());
        return slopeHumanMonitoredCrackMapper.insertSlopeHumanMonitoredCrack(slopeHumanMonitoredCrack);
    }

    /**
     * 修改边坡地裂缝
     * 
     * @param slopeHumanMonitoredCrack 边坡地裂缝
     * @return 结果
     */
    @Override
    public int updateSlopeHumanMonitoredCrack(SlopeHumanMonitoredCrack slopeHumanMonitoredCrack)
    {
        slopeHumanMonitoredCrack.setUpdateTime(DateUtils.getNowDate());
        return slopeHumanMonitoredCrackMapper.updateSlopeHumanMonitoredCrack(slopeHumanMonitoredCrack);
    }

    /**
     * 批量删除边坡地裂缝
     * 
     * @param ids 需要删除的边坡地裂缝主键
     * @return 结果
     */
    @Override
    public int deleteSlopeHumanMonitoredCrackByIds(Long[] ids)
    {
        return slopeHumanMonitoredCrackMapper.deleteSlopeHumanMonitoredCrackByIds(ids);
    }

    /**
     * 删除边坡地裂缝信息
     * 
     * @param id 边坡地裂缝主键
     * @return 结果
     */
    @Override
    public int deleteSlopeHumanMonitoredCrackById(Long id)
    {
        return slopeHumanMonitoredCrackMapper.deleteSlopeHumanMonitoredCrackById(id);
    }
}
